package com.zt.order.client;

import com.zt.order.client.fallback.UserClientFallbackFactory;
import com.zt.order.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author: zt
 * @Description: TODO
 * @create: 2024-06-10 19:15
 */

@FeignClient(value = "userservice", fallbackFactory = UserClientFallbackFactory.class)
public interface UserClient {

    @GetMapping("/user/{id}")
    User findById(@PathVariable("id") Long id);
}
